// 购物车
import http from '../request'
// 获取自己的购物车信息(需要token)
export function getCartApi(params){
  return http({
    method:'GET',
    url:'/api/shop/shoppingCart',
    params
  })
}
// 添加购物车(需要token)
export function addCartApi(data){
  return http({
    method:'POST',
    url:'/api/shop/shoppingCart',
    data
  })
}
// 更新购物车单条信息(需要token)
export function updateCartApi(id,data){
  return http({
    method:'PUT',
    url:`/api/shop/shoppingCart/${id}`,
    data
  })
}
// 删除购物车一条信息(需要token)
export function delCartApi(id){
  return http({
    method:'DELETE',
    url:`/api/shop/shoppingCart/${id}`,
  })
}